﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="reg.aspx.cs" Inherits="reg" %>

<%@ Register Src="boot.ascx" TagName="boot" TagPrefix="uc1" %>
<%@ Register Src="public/validatecode.ascx" TagName="validatecode" TagPrefix="uc2" %>
<%@ Register Src="header.ascx" TagName="header" TagPrefix="uc3" %>
<uc3:header ID="header1" runat="server" />
<div class="main_div">
    <div class="main_content">
    <form id="form1" runat="server">
    <div style="text-align: center">
        <span class="STYLE3">组织用户注册</span>
    </div>
    <div id="main" style="text-align: center;">
        <asp:scriptmanager id="ScriptManager1" runat="server"></asp:scriptmanager>
        <div id="content">
            <table style="width: 700px; text-align: left;">
                <tr>
                    <td class="style1">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <a href="default.aspx">已经注册？前去登录</a>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        <span class="style2">*</span>用户名：
                    </td>
                    <td>
                        <asp:updatepanel id="UpdatePanel1" runat="server">
                    <ContentTemplate>
                    <asp:TextBox ID="tb_username" runat="server" MaxLength="20" AutoPostBack="True" 
                            ontextchanged="tb_username_TextChanged"></asp:TextBox>
                        <asp:Label ID="Label1" runat="server" style="color: #CC3300" 
                        Text="*此用户名已经使用" Visible="False"></asp:Label>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="tb_username" EventName="TextChanged" />
                        </Triggers>
                    </asp:updatepanel>
                        <asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" controltovalidate="tb_username"
                            errormessage="必须输入">*</asp:requiredfieldvalidator>
                        <asp:regularexpressionvalidator id="RegularExpressionValidator6" runat="server" controltovalidate="tb_username"
                            errormessage="长度不符合" validationexpression="^(\s|\S){4,20}$"></asp:regularexpressionvalidator>
                    </td>
                    <td>
                        2-10个中文或4-20个英文字符
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        <span class="style2">*</span>密码：
                    </td>
                    <td>
                        <asp:textbox id="tb_password" runat="server" textmode="Password" cssclass="pwdWidth"
                            maxlength="16"></asp:textbox>
                        <asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" controltovalidate="tb_password"
                            errormessage="必须输入">*</asp:requiredfieldvalidator>
                        <asp:regularexpressionvalidator id="RegularExpressionValidator7" runat="server" controltovalidate="tb_password"
                            errormessage="长度不符合" validationexpression="^(\s|\S){6,16}$"></asp:regularexpressionvalidator>
                    </td>
                    <td>
                        6-16位各种字符长度
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        <span class="style2">*</span>确认密码：
                    </td>
                    <td>
                        <asp:textbox id="tb_repassword" runat="server" textmode="Password" cssclass="pwdWidth"
                            maxlength="16"></asp:textbox>
                        <asp:requiredfieldvalidator id="RequiredFieldValidator3" runat="server" controltovalidate="tb_repassword"
                            errormessage="必须输入">*</asp:requiredfieldvalidator>
                        <asp:comparevalidator id="CompareValidator1" runat="server" controltocompare="tb_password"
                            controltovalidate="tb_repassword" errormessage="两次密码不一样"></asp:comparevalidator>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        <span class="style2">*</span>真实姓名：
                    </td>
                    <td>
                        <asp:textbox id="tb_realname" runat="server" maxlength="10"></asp:textbox>
                        <asp:requiredfieldvalidator id="RequiredFieldValidator5" runat="server" controltovalidate="tb_realname"
                            errormessage="必须填写">*必须填写</asp:requiredfieldvalidator>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        性别：
                    </td>
                    <td>
                        <asp:dropdownlist id="ddl_sex" runat="server">
                        <asp:ListItem Selected="True">男</asp:ListItem>
                        <asp:ListItem>女</asp:ListItem>
                    </asp:dropdownlist>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        手机号码：
                    </td>
                    <td>
                        <asp:textbox id="tb_mphone" runat="server" maxlength="20"></asp:textbox>
                        <asp:regularexpressionvalidator id="RegularExpressionValidator2" runat="server" controltovalidate="tb_mphone"
                            errormessage="电话号码格式不正确" validationexpression="((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)"></asp:regularexpressionvalidator>
                    </td>
                    <td>
                        如：137****6848
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        E-mail：
                    </td>
                    <td>
                        <asp:textbox id="tb_email" runat="server" maxlength="50"></asp:textbox>
                        <asp:regularexpressionvalidator id="RegularExpressionValidator3" runat="server" controltovalidate="tb_email"
                            errormessage="格式不正确" validationexpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:regularexpressionvalidator>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        生日日期：
                    </td>
                    <td>
                        <input name="birthday" id="birthday" type="text" onclick="new Calendar(1951,(new Date()).getYear()).show(this);"
                            readonly="readonly" />
                        <img alt="" src="IMAGES/datePicker.gif" width="16" height="22" align="middle" />
                        <!--验证日期格式的验证控件：正则表达式：
                    ^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))$
                        -->
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        住址：
                    </td>
                    <td>
                        <asp:textbox id="tb_address" runat="server" width="325px" maxlength="100"></asp:textbox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        邮编：
                    </td>
                    <td>
                        <asp:textbox id="tb_postcode" runat="server" maxlength="10"></asp:textbox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        <span class="style2">*</span>组织名称：
                    </td>
                    <td>
                        <asp:textbox id="tb_organization" runat="server" maxlength="50"></asp:textbox>
                        <asp:requiredfieldvalidator id="RequiredFieldValidator4" runat="server" controltovalidate="tb_organization"
                            errormessage="必须输入">*必须输入</asp:requiredfieldvalidator>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        组织电话：
                    </td>
                    <td>
                        <asp:textbox id="tb_phone" runat="server" maxlength="20"></asp:textbox>
                        <asp:regularexpressionvalidator id="RegularExpressionValidator4" runat="server" controltovalidate="tb_phone"
                            errormessage="格式不正确" validationexpression="((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)"></asp:regularexpressionvalidator>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        组织地址：
                    </td>
                    <td>
                        <asp:textbox id="tb_organizationaddress" runat="server" width="325px" maxlength="100"></asp:textbox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        组织邮编：
                    </td>
                    <td>
                        <asp:textbox id="tb_org_postcode" runat="server" maxlength="10"></asp:textbox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        组织联系人：
                    </td>
                    <td>
                        <asp:textbox id="tb_contactperson" runat="server" maxlength="10"></asp:textbox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        联系人Email：
                    </td>
                    <td>
                        <asp:textbox id="tb_contactemail" runat="server" maxlength="50"></asp:textbox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        组织介绍：
                    </td>
                    <td>
                        <asp:textbox id="tb_description" runat="server" textmode="MultiLine" height="56px"
                            rows="4" width="325px"></asp:textbox>
                        <asp:regularexpressionvalidator id="RegularExpressionValidator5" runat="server" errormessage="*请适量删减内容"
                            validationexpression="^(\s|\S){0,100}$" controltovalidate="tb_description"></asp:regularexpressionvalidator>
                    </td>
                    <td>
                        50个汉字或者100个英文字符以内
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        <span class="style2">*</span>验证码：
                    </td>
                    <td>
                        <asp:textbox id="tb_vali_code" runat="server"></asp:textbox>
                        <img alt="" src="Code.aspx" /><asp:requiredfieldvalidator id="RequiredFieldValidator6"
                            runat="server" errormessage="RequiredFieldValidator" controltovalidate="tb_vali_code">*</asp:requiredfieldvalidator>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        &nbsp;
                    </td>
                    <td>
                        <asp:linkbutton id="LinkButton1" runat="server" onclick="LinkButton1_Click" cssclass="imgborder">
                        <img runat="server" src="~/images/reg.gif" alt="注册" /></asp:linkbutton>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:linkbutton id="LinkButton2" runat="server" onclientclick="Javascript:window.close();"
                            cssclass="imgborder"><img src="images/Button_close.bmp" alt="" title="关闭页面" /></asp:linkbutton>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <a href="default.aspx">已经注册？前去登录</a>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
    </div>
</div>
<uc1:boot ID="boot1" runat="server" />
